import instance from "@/utils/request"

// 注册
// post请求传参得用data
export function goRegister(data) {
  return instance({
    url: 'api/user/reg',
    method: 'post',
    data
  })
}

// 验证手机号是否被注册过
export function doCheckPhone(data) {
  return instance({
    url: 'api/user/docheckphone',
    method: 'post',
    data
  })
}

// 发送短信验证码
export function doSendmsgcode(data) {
  return instance({
    url: 'api/user/dosendmsgcode',
    method: 'post',
    data
  })
}

// 验证短信验证码
export function doCheckcode(data) {
  return instance({
    url: 'api/user/docheckcode',
    method: 'post',
    data
  })
}

//登录
export function doLogin(data) {
  return instance({
    url: 'api/user/login',
    method: 'post',
    data
  })
}